﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Fsb.Utility
{
    public class StringUtility
    {
        public static string SubString(string content, string startTag, string endTag)
        {
            int start = content.IndexOf(startTag);
            if (start > -1)
            {
                start = start + startTag.Length;

                if (string.IsNullOrEmpty(endTag)) return content.Substring(start);

                int end = content.IndexOf(endTag, start);
                if (end > -1)
                {
                    return content.Substring(start, end - start);
                }
            }

            return string.Empty;
        }
    }
}
